﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:th="http://www.thymeleaf.org">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>修改密码</title>
	<link th:href="@{css/style.css}" rel="stylesheet" type="text/css" />
	<script th:src="@{/js/base.js}"></script>
	<script>
		//构建修改密码
		function buildPostData(){
			return {"id": "1","password":$("#newPassword").val()};
		}
		$(function(){
			//样式转换
			//成功回调
			function success(result){
				alert(result);
			}
			//失败回调
			function failure(result){
				alert(result);
			}
			//登录操作
			$("#changePwd").click(function(){
				postRequest("http://localhost:8883/user/save",buildPostData(),success,failure);
			});
		});
	</script>
</head>
<body>
	<div class="place">
    	<span>位置：</span>
    		<ul class="placeul">
    			<li><a th:href="@{/main}" target="_parent">首页</a></li>
    			<li><a th:href="@{/changePwd}" target="_self">修改密码</a></li>
    		</ul>
    </div>
    <div class="formbody">
    	<div class="formtitle"><span>修改密码</span></div>
    	<ul class="forminfo">
    		<li><label>旧密码</label><input name="" id= "oldPassword" type="password" class="dfinput" /><i>忘记旧密码</i></li>
    		<li><label>新密码</label><input name="" type="newPassword" class="dfinput" /><i>不可以与原密码一样</i></li>
    		<li><label>&nbsp;</label><input name="" id= "changePwd" type="button" class="btn" value="确认保存"/></li>
    	</ul>
    </div>
</body>
</html>
